package com.tencent.bk.sdk.iam.dto.expression;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.tencent.bk.sdk.iam.constants.ExpressionOperationEnum;
import lombok.Data;

import java.util.List;

@Data
public class ExpressionDTO {
    @JsonProperty("op")
    private ExpressionOperationEnum operator;
    private String field;
    private Object value;
    private List<ExpressionDTO> content;
    private String result;

    public boolean isEmpty() {
        ExpressionDTO expressionDTO = new ExpressionDTO();
        expressionDTO.setResult(result);
        return (expressionDTO).equals(this);
    }
}
